<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInLeft">
    <div>
        <div class="row">
            <div class="pt10">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>消息详情</h5>
                        </div>
                        <div class="ibox-content clearfix p-t">
                            <div class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">使用条件</label>
                                    <div class="col-sm-10">
                                        <p class="form-control-static">限定使用范围-专业/科目：
                                            <th:block th:if="!${#lists.isEmpty(affiche['subjectList'])}">
                                                <span class="fs12 c-4e" th:each="subject,subIndex : ${affiche['subjectList']}">
                                                    <th:block th:text="${subject['subjectName']}+'/'"></th:block>
                                                    <th:block th:if="!${#lists.isEmpty(subject['childSubjectList'])}" th:each="child,index : ${subject['childSubjectList']}">
                                                        <th:block th:if="${index.last} == false" th:text="${child['subjectName']}+'/'"></th:block>
                                                        <th:block th:if="${index.last} == true" th:text="${child['subjectName']}"></th:block>
                                                    </th:block>
                                                    <th:block th:if="${#lists.isEmpty(subject['childSubjectList'])}">全部科目</th:block>
                                                    <th:block th:if="${subIndex.last}==false" th:utext="'<br/>'"></th:block>
                                                </span>
                                            </th:block>
                                            <th:block th:if="${#lists.isEmpty(affiche['subjectList'])}">
                                                <span class="fs12 c-4e">—</span>
                                            </th:block>
                                        </p>
                                        <p th:if="!${#lists.isEmpty(affiche['courseList'])}" class="form-control-static">限定使用范围-课程：<span th:each="course,index : ${affiche['courseList']}" th:text="${index.index} lt (${#lists.size(affiche['courseList'])}-1)?${course['courseName']}+'/': ${course['courseName']}" ></span></p>
                                        <p th:if="${#lists.isEmpty(affiche['courseList'])}" class="form-control-static">限定使用范围-课程：<span>—</span></p>
                                    </div>
                                </div>
                                <div class="hr-line-dashed" th:if="!${#lists.isEmpty(affiche['courseList'])}"></div>
                                <div class="form-group" th:if="!${#lists.isEmpty(affiche['courseList'])}">
                                    <label class="col-sm-2 control-label text-right">限定课程</label>
                                    <div class="col-sm-9">
                                        <div class="pt10">
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                <tr>
                                                    <th class="text-center">ID</th>
                                                    <th class="text-center">课程名称</th>
                                                    <th class="text-center">价格</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                <tr th:each="course:${affiche['courseList']}">
                                                    <td class="text-center" th:text="${course['id']}"></td>
                                                    <td class="text-center" th:text="${course['courseName']}">
                                                    <td class="text-center"><span class="c-red" th:text="${course['realPrice']}"></span></td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">消息内容</label>
                                    <div class="col-sm-10">
                                        <p class="form-control-static"  th:utext="${affiche['context']}"></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
